package com.lijie.userservice.service;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lijie.userservice.entity.TbUser;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;


import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author ange
 * @since 2020-07-19
 */
public interface TbUserService extends IService<TbUser> {
    List<TbUser> findUserAndDept(Integer current,Integer size);
    Integer findUserAndDeptCount();


    IPage<TbUser> findUserPage(Page<TbUser> page, QueryWrapper<TbUser> wrapper);


    /**
     * 导出用户信息
     * @param response
     * @throws IOException
     */
    void exportUserInfoExcel(HttpServletResponse response,List<TbUser> tbUsers) throws IOException;

    /**
     * 改变用户状态
     * @param id
     * @param status
     * @return
     */
    boolean updStatus(Integer id,Integer status);

    /**
     * 导入用户信息
     * @param file
     * @throws IOException
     */
    void importUserInfoExcel(MultipartFile file) throws IOException;
}

